<?php
class User extends AppModel {
	var $name = 'User';
	var $validate = array(
		'username' => array(
			'alphaNumeric' => array(
				'rule' => 'alphaNumeric',
				'required' => 'true',
				'message' => 'Letters and numbers only.'
				),
			'between' => array(
				'rule' => array('between', 4, 15),
				'message' => 'Must be between 4 and 15 characters.'
				)
			),
		'password' => array(
			'alphanumeric' => array(
				'rule' => 'alphaNumeric',
				'required' => 'true',
				'message' => 'Letters and numbers only.'
				),
			'between' => array(
				'rule' => array('between', 7, 50),
				'message' => 'Must be at least 7 characters.'
				)
			),
		'email' => array(
			'rule' => array('email', true),
			'message' => 'Please enter a valid email address.'
			)
		);
}
?>